package com.model;

import com.jfinal.plugin.activerecord.Model;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Hexun on 2017/7/30 0030.
 */
public class StudentPaper extends Model<StudentPaper>{

    public static StudentPaper dao=new StudentPaper();

    public List<StudentPaper> getStudentPaperBySno(String sno, List<PaperConfig> paperConfigList){
        String sql = "select * from StudentPaper where sno = '" + sno + "';";
        System.out.println(sql);
        List<StudentPaper> studentPaperList = new ArrayList<StudentPaper>();
        try {
            studentPaperList=dao.find(sql);
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }
        if (null == studentPaperList || studentPaperList.size() == 0) {
            return null;
        }
        return studentPaperList;
    }
}
